const express = require("express");
const router = express.Router();

const MySql = require("../lib/mysql");

router.post("/userHonor",async(req,res,next) => {

    const userId = req.body.id;
    const id = req.body.user_id;
    const honor = req.body.honor;
    
        const resInsert = await MySql.query('insert honor(id,user_id,honor) values(?,?,?)',[id,userId,honor]);

        res.json({
            id:resInsert.insertId,
            code:1,
            message:'honor更新成功',
        })
    


});

module.exports = router;